﻿using CL.Business.BLL;
using CL.View.Entity.Business;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CL.UnionWeb.union
{
    public partial class Extensionecord : BasePage
    {
        protected string Keys = string.Empty;
        protected List<udv_PopularizeDetail> listDetail = null;
        protected int iPage = 1;
        protected const int PageSize = 15;
        protected int iCurrentListCount = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "推广联盟-推广记录";
            if (null != Request["page"])
                iPage = int.Parse(Request["page"].ToString());

            if (null != Request["search"])
                Keys = Request["search"].ToString();

            var bll = new AgencyUserBLL();
            var un_Entity = base.GetUnionInfo();
            listDetail = bll.QueryExtendDetails(un_Entity.AccountID, DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd"), DateTime.Now.ToString("yyyy-MM-dd"), iPage, PageSize, Keys, ref iCurrentListCount);

            new RecordBLL().InsertEntity(new Business.Entity.RecordEntity()
            {
                AccountID = un_Entity.AccountID,
                RecordTime = DateTime.Now,
                RecordRemark = string.Format("查看推广记录 "),
                RecordType = 6
            });
        }
    }
}